import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
class Conexion {

	public Conexion(){
	}

	public Connection getConexion(String host,String usuario,String pw,String nombreBD,String schema) throws SQLException, ClassNotFoundException{
		Connection connection = null;
		String driver = "org.postgresql.Driver";
		String url = "jdbc:postgresql://"+host+"/"+nombreBD;
		Class.forName(driver);
		connection =	DriverManager.getConnection(url, usuario, pw);
		System.out.println("Conexion Ok");
		return connection;
	}
}